<template>
  <div class="not-found-module">
    <div class="not-found-content">
      <div class="text">
        <div class="rows">
          <span>404</span>
          <span>页面不存在或接口地址未找到，请尝试回到首页重新进入，或联系开发人员修复</span>
          <el-button type="primary" round @click="returnToHome">回到首页</el-button>
        </div>
      </div>
      <div class="image">
        <img src="@/assets/404.gif" alt="" />
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
@Component
class NotFound extends Vue {
  returnToHome() {
    this.$router.replace({ path: '/' })
  }
}
export default NotFound
</script>

<style lang="less" scoped>
@import '~@/styles/theme.less';
@import '~@/styles/layout.less';
.not-found-module {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: url('../../../assets/404_bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  #flex(row, center, center);
  .not-found-content {
    z-index: 1;
    width: 60%;
    height: 70%;
    border-radius: 20px;
    opacity: 0.8;
    #flex(row, center, space-between);
    #color(background-color, --module-bg-color);
    #shadow-color(0, 0, 8px, 1px, --primary-shadow-color);
    .text,
    .image {
      flex: 1;
      height: 100%;
      z-index: 2;
      #flex(row, center, center);
    }
    .text > .rows {
      width: 60%;
      height: 40%;
      #flex(column, flex-start, space-around);
      span {
        font-size: 16px;
        text-align: left;
        #color(color, --primary-text-color);
      }
    }
    .text > .rows {
      span:first-child {
        font-size: 96px;
        font-weight: 600;
        #color(color, --heavier-blue-color);
      }
    }
    .image > img {
      width: 95%;
    }
  }
}
.not-found-module::after {
  backdrop-filter: blur(20px);
  content: '';
  display: block;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 0;
}
</style>
